package com.alameda.pojo.info;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务信息实体类
 *
 * @author Lv
 * @date 2024/06/10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("xxl_job_info")
@ApiModel(value = "XxlJobInfoDO", description = "定时任务信息")
public class JobInfoDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Integer id;

    /**
     * 执行器主键ID
     */
    @TableField(value = "job_group")
    @ApiModelProperty(value = "执行器主键ID")
    private Integer jobGroup;

    /**
     * 任务描述
     */
    @TableField(value = "job_desc")
    @ApiModelProperty(value = "任务描述")
    private String jobDesc;

    /**
     * 添加时间
     */
    @TableField(value = "add_time")
    @ApiModelProperty(value = "添加时间")
    private Date addTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 作者
     */
    @TableField(value = "author")
    @ApiModelProperty(value = "作者")
    private String author;

    /**
     * 报警邮件
     */
    @TableField(value = "alarm_email")
    @ApiModelProperty(value = "报警邮件")
    private String alarmEmail;

    /**
     * 调度类型
     */
    @TableField(value = "schedule_type")
    @ApiModelProperty(value = "调度类型")
    private String scheduleType;

    /**
     * 调度配置，值含义取决于调度类型
     */
    @TableField(value = "schedule_conf")
    @ApiModelProperty(value = "调度配置，值含义取决于调度类型")
    private String scheduleConf;

    /**
     * 调度过期策略
     */
    @TableField(value = "misfire_strategy")
    @ApiModelProperty(value = "调度过期策略")
    private String misfireStrategy;

    /**
     * 执行器路由策略
     */
    @TableField(value = "executor_route_strategy")
    @ApiModelProperty(value = "执行器路由策略")
    private String executorRouteStrategy;

    /**
     * 执行器任务handler
     */
    @TableField(value = "executor_handler")
    @ApiModelProperty(value = "执行器任务handler")
    private String executorHandler;

    /**
     * 执行器任务参数
     */
    @TableField(value = "executor_param")
    @ApiModelProperty(value = "执行器任务参数")
    private String executorParam;

    /**
     * 阻塞处理策略
     */
    @TableField(value = "executor_block_strategy")
    @ApiModelProperty(value = "阻塞处理策略")
    private String executorBlockStrategy;

    /**
     * 任务执行超时时间，单位秒
     */
    @TableField(value = "executor_timeout")
    @ApiModelProperty(value = "任务执行超时时间，单位秒")
    private Integer executorTimeout;

    /**
     * 失败重试次数
     */
    @TableField(value = "executor_fail_retry_count")
    @ApiModelProperty(value = "失败重试次数")
    private Integer executorFailRetryCount;

    /**
     * GLUE类型
     */
    @TableField(value = "glue_type")
    @ApiModelProperty(value = "GLUE类型")
    private String glueType;

    /**
     * GLUE源代码
     */
    @TableField(value = "glue_source")
    @ApiModelProperty(value = "GLUE源代码")
    private String glueSource;

    /**
     * GLUE备注
     */
    @TableField(value = "glue_remark")
    @ApiModelProperty(value = "GLUE备注")
    private String glueRemark;

    /**
     * GLUE更新时间
     */
    @TableField(value = "glue_updatetime")
    @ApiModelProperty(value = "GLUE更新时间")
    private Date glueUpdatetime;

    /**
     * 子任务ID，多个逗号分隔
     */
    @TableField(value = "child_jobid")
    @ApiModelProperty(value = "子任务ID，多个逗号分隔")
    private String childJobid;

    /**
     * 调度状态：0-停止，1-运行
     */
    @TableField(value = "trigger_status")
    @ApiModelProperty(value = "调度状态：0-停止，1-运行")
    private Byte triggerStatus;

    /**
     * 上次调度时间
     */
    @TableField(value = "trigger_last_time")
    @ApiModelProperty(value = "上次调度时间")
    private Long triggerLastTime;

    /**
     * 下次调度时间
     */
    @TableField(value = "trigger_next_time")
    @ApiModelProperty(value = "下次调度时间")
    private Long triggerNextTime;

}
